Haemosphere

Parameter

Helper functions

Import data

Select samples by meta

Select sample and order count matrix by meta

Reset meta sample id and cnt column names

Translate count matrix ENSEMBL to Symbol

Filter count matrix by genes

Set factor level

PCA on all data

Design and contrast matrix

Explanatory variable (factor): Cell lineage (design_cl) or cell type (design_ct)
Indipendent meassurements (character): Cell type with batch information
Statistical model: Means model to get all possible combinations of levels
Design matrix: Coded as model.matrix(~ 0+explanatory_variable) which is here equivalent to model.matrix(~ explanatory_variable)

Compare main label

Compare fine labels

Compare erythoblast stages

Compare multipotent progenitor cells

Compare restricted progenitor cells

Create SingleR object

Annotate SPLENO single cell data with Haemosphere SingleR object

Save SingleR Haemosphere annotation

Plot SingleR delta score with label count

The main labels are not predicted by SingleR! We just use the top annoation for grouping e.g. the top lable for a particular cell might differ.

Plot UMAP with SingleR Haemosphere annotation